package com.gzh.system.model.vo;

import com.gzh.core.model.vo.BaseParam;
import com.gzh.system.service.dto.LoginIn;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import javax.validation.constraints.NotNull;

/**
 * @Author guanzh
 * @Date 2021/12/27 10:31
 * @Description
 */
@Getter
@Setter
@ToString
public class LoginParam extends BaseParam {
    //密码
    @NotNull(message = "密码不能为空")
    private String password;
    //账号
    @NotNull(message = "用户名不能为空")
    private String userName;

    public LoginIn paramToIn() {
        LoginIn in = new LoginIn();
        in.setPassword(this.password);
        in.setUserName(this.userName);
        return in;
    }
}
